module.exports = plop => {
    plop.setGenerator('comp',{
        description: 'create a new component or page',
        prompts: [
            {
                type: 'input',
                name: 'name',
                message: 'Your component name?',
                default: 'NewComponent'
            },
            {
                type: 'list',
                name: 'dir',
                message: 'Where do you put it?',
                choices: [
                    {name: 'components', value: 'components'},
                    {name: 'pages', value: 'pages'}
                ]
            }
        ],
        actions: [
            {
                type: 'add',
                path: 'src/{{dir}}/{{name}}/index.jsx',
                templateFile: 'plop-templates/component.jsx.hbs'
            },
            {
                type: 'add',
                path: 'src/{{dir}}/{{name}}/index.css',
                templateFile: 'plop-templates/component.css.hbs'
            }
        ]
    })
}